/**
 * \file mod_vol.c
 * \brief Mode de commande volume.
 * \author Nicolas M.
 * \version 0.1
 * \date 20 mars 2011
 *
 *
 */

#include "mode_vol.h"

#include "../control/ctrl_vol.h"

#include "../utils/utils.h"
#include <msp430x14x.h>
#include <stdlib.h>
#include <stdio.h>

char volTxtBuffer[16];

void volButton2fct()
{
	augmenterVolume();
	//saveVolume(getVolume());
}

void volButton3fct()
{
	diminuerVolume();
	//saveVolume(getVolume());
}

void activateVolMode()
{
	setVolume(getVolume());
}

char *getVolText()
{
	char *chaine, substr;
	chaine = volTxtBuffer;
	sprintf(chaine , "Volume $");
	*strstr(chaine,"$") = getVolume()+'0'; // To ASCII code 
	return chaine;
}
